#include<bits/stdc++.h>

using namespace std;

int main(){
    string a;
    cin>>a;
    if(a.length()==4){
        string year =a.substr(0,2);
        string month =a.substr(2,4);
        int y =atoi(year.c_str());//string 转换成int
        if(y<22){
            cout<<"20"<<year<<"-"<<month;
        }else
            cout<<"19"<<year<<"-"<<month;
    }else if(a.length()==6){
        string year =a.substr(0,4);
        string month =a.substr(4,6);
        cout<<year<<"-"<<month;
    }
    return 0;
}
/*
char c[20]; 
string s="1234"; 
strcpy(c,s.c_str()); 
c_str() 返回的是 char *“s” ;相当于c语言的串 可以直接复制给字符数组
string转换成字符数组 和java的String.toCharArray()类似
*/